// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import '../src/reset/reset.css'
import moment from "moment";
Vue.prototype.$moment = moment;

Vue.config.productionTip = false

import Utils from "./utils";
Vue.use(Utils);

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);



//路由守卫
// router.beforeResolve((to, from, next) => { 
//  let token = to.query.token ? to.query.token : null;
//  if (token) {  
//    localStorage.setItem("mytoken", token);
//  }
//  token = localStorage.getItem("mytoken");
//  if (!token) {  
//  } else {   
//    next(); 
//  }
// });

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
